<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset='utf-8'/>
	<title>lesson2_ajax封装</title>
</head>
<body>
<button>发送请求</button>

<script src="lesson2_ajaxEncapsulation.js"></script>
<script>
	document.querySelector('button').onclick = function (){
		window.frankAjax({
			type:'get',
			url:'lesson2_ajaxEncapsulation.php',
			data:{
				username:'test-frank',
				password:'test-123456'
			},
			success:function (res){
				console.log(res);
			}
		});
	};

</script>
</body>
</html>